<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>datepicker组件开发</title>
	<style type="text/css">
		#date-input{
			width: 190px;
			padding: 5px;
			border-radius: 4px;
		}
		.datepicker-wraper{
			border: solid 1px lightgray;
			width: 200px;
		}
		.datepicker-wraper table{
			width: 100%;
			padding: 5px;
			border-collapse: collapse;
		} 
		.datepicker-wraper table td{
			border: solid 1px lightgray;
		}
	</style>
	<script type="text/javascript">
		var date = new Date(2017,5,0); 
		var week = {
			1:'一',
			2:'二',
			3:'三',
			4:'四',
			5:'五',
			6:'六',
			0:'日',
		}
		var year = 2017,month = 5;
		// 获取某月的第一天
		var dateFirst = new Date(year,month-1,1);//这个月(month-1)的第一天

		// 获取某月的最后一天 0:代表上个月(month)的最后一天 month = 实际月份-1
		var dateLast = new Date(year,month,0);

		//alert(dateLast);

	</script>
</head>
<body>
	<input type="text" name="" id="date-input">
	<div class="datepicker-wraper">
	</div>
	<script type="text/javascript" src="date.js"></script>
	<script type="text/javascript">
		datepicker.render('.datepicker-wraper');
		
	</script>
</body>
</html>